{% extends "base_password.html" %}
{% load i18n %}
{% load url from future %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}/admin/css/forms.css" />{% endblock %}

{% block title %}
    Solicitud de cambio de Contraseña
{% endblock %}

{% block branding %}
{% endblock branding %}

{% block userlinks %}
    <script type="text/javascript">
        document.getElementById("welcome").className="";
        document.getElementById("change_passwd").className="active";
    </script>
{% endblock %}

{% block content %}
    <div id="content-main">
        <form action="" method="post">{% csrf_token %}
            <div class="well" style="margin-top:20px;">
                {% if form.errors %}
                    <div class="alert alert-error">
                        <button type="button" class="close" data-dismiss="alert">&times;</button>
                        {% blocktrans count form.errors.items|length as counter %}Por favor corriga el error{% plural %}Por favor corriga los errores{% endblocktrans %}
                    </div>
                {% endif %}

                <h3>Cambio de Contraseña</h3>

                <p class="alert alert-info">Por favor ingrese su vieja contraseña, y por cuestiones de seguridad, ingrese su nueva contraseña dos veces para realizar la verificación</p>

                <fieldset class="module aligned wide">

                <div class="form-row">
                    {% if form.old_password.errors %}<div class="alert alert-error">{{ form.old_password.errors }}</div>{%  endif %}
                    <label for="id_old_password" class="required">Contraseña anterior:</label>{{ form.old_password }}
                </div>

                <div class="form-row">
                    {% if form.new_password1.errors %}<div class="alert alert-error">{{ form.new_password1.errors }}</div>{% endif %}
                    <label for="id_new_password1" class="required">Contraseña nueva:</label>{{ form.new_password1 }}
                </div>

                <div class="form-row">
                    {% if form.new_password2.errors %}<div class="alert alert-error">{{ form.new_password2.errors }}</div>{% endif %}
                    <label for="id_new_password2" class="required">Contraseña nueva (de nuevo):</label>{{ form.new_password2 }}
                </div>

                </fieldset>

                <input type="submit" value="Cambiar" class="btn btn-primary" style="margin:10px 0 0 200px;" />

                <script type="text/javascript">document.getElementById("id_old_password").focus();</script>
            </div>
        </form>
    </div>

{% endblock %}
